package com.asset.troubleticket.domain;

import java.io.Serializable;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@SuppressWarnings("serial")
@Entity
@Table(name = "tt_department")
public class Department implements Serializable {

	private Integer id;
	private String deptName;
	private String deptDescription;
	private String deptInfo;
	private boolean deptFlag;
	private Company companyId;

	public String getDeptDescription() {
		return deptDescription;
	}

	@Column(name = "description")
	public void setDeptDescription(String deptDescription) {
		this.deptDescription = deptDescription;
	}

	@Column(name = "info")
	public String getDeptInfo() {
		return deptInfo;
	}

	public void setDeptInfo(String deptInfo) {
		this.deptInfo = deptInfo;
	}

	@Column(name = "flag")
	public boolean isDeptFlag() {
		return deptFlag;
	}

	public void setDeptFlag(boolean deptFlag) {
		this.deptFlag = deptFlag;
	}

	/**
	 * @return the id
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "tt_department_id_seq")
	@SequenceGenerator(name = "tt_department_id_seq", sequenceName = "tt_department_id_seq", allocationSize = 1)
	public Integer getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * @return the deptName
	 */
	@Column(name = "dept_name")
	public String getDeptName() {
		return deptName;
	}

	/**
	 * @param deptName
	 *            the deptName to set
	 */
	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	/**
	 * @return the deptMangerId
	 */

	/**
	 * @return the companyId
	 */
	@ManyToOne
	@JoinColumn(name = "company_id")

	public Company getCompanyId() {
		return companyId;
	}

	/**
	 * @param companyId
	 *            the companyId to set
	 */
	public void setCompanyId(Company companyId) {
		this.companyId = companyId;
	}

}
